﻿using System;
using System.Collections.Generic;
using System.Threading;

namespace ABCat.Core.Plugins.Sites
{
	public interface ISiteParserPlugin : IPlugin
	{
		/// <summary>
		/// Начать обновление списка записей
		/// </summary>
		/// <param name="recordGroupsIds"></param>
		/// <param name="smallProgressCallback"></param>
		/// <param name="totalProgressCallback"></param>
		/// <param name="completedCallback"></param>
		/// <param name="cancellationToken"></param>
		void BeginDownloadRecordGroupsAsync(HashSet<string> recordGroupsIds, Action<int, int, string> smallProgressCallback, Action<int, int, string> totalProgressCallback, Action<Exception> completedCallback, CancellationToken cancellationToken);
		void BeginDownloadRecordsAsync(HashSet<string> recordsIds, bool cacheFirst, Action<int, int, string> smallProgressCallback, Action<int, int, string> totalProgressCallback, Action<Exception> completedCallback, CancellationToken cancellationToken);
		void BeginDownloadRecordSourcePageAsync(string recordKey, Action<string, Exception> completedCallback, CancellationToken cancellationToken);
	}
}